package Job.Voter.Voter;

public class Voter {
    private String name;
    private int ticket;

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getTicket() {
        return ticket;
    }
    public void setTicket(int ticket) {
        this.ticket = ticket;
    }

    public Voter(String name, int ticket) {
        this.setName(name);
        this.setTicket(ticket);
    }

    public Voter() {
    }

    public void Ticket(){
        if (ticket == 101){
            System.out.println("停止投票!");
        }else {
            System.out.println(this.name+ "的当前票数:" +this.ticket);
        }
    }
}
